﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace Zhaoxi.SSQDemo
{

    /// <summary>
    /// 是一个球号码
    /// 
    /// </summary>
    public class BallModel   : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler? PropertyChanged;

        /// <summary>
        /// 球号码
        /// </summary>
        public int Number { get; set; }

        //运动向量
        public Vector Direction { get; set; }

        //是否是被选中的球号码
        public bool IsSelected { get; set; } = false;


        /// <summary>
        /// 坐标轴中的
        /// </summary>
        private double _x;

        public double X
        {
            get { return _x; }
            set
            {
                _x = value;

                 PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("X"));
            }
        }
        private double _y;


        public double Y
        {
            get { return _y; }
            set
            {
                _y = value;
               PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Y"));
            }
        }

    }
}
